package com.example.nbb.Controller;

import com.example.nbb.Service.SortService;
import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.*;

@CrossOrigin//跨域
@RestController//遵循RestFul
@RequestMapping("/nbb/Sort/")
public class SortController {

    @Resource
    SortService sortService;
    //获取所有分类
    @GetMapping("getAll")
    public String getAll() {
        return sortService.getSort();
    }
}
